<template>
  <view class="">
    <!-- <back></back> -->
    <view class="item" v-for="(item, index) in list" :key="index">
      <view class="" @click="choseBank(item)">
        <view class="it_flex">
          <view class="it_left">姓名</view>
          <view class="it_right">{{ item.username }}</view>
        </view>
        <view class="it_flex">
          <view class="it_left">手机号</view>
          <view class="it_right">{{ item.mobile }}</view>
        </view>
        <view class="it_flex">
          <view class="it_left">提现方式</view>
          <view class="it_right">{{ item.bankName }}</view>
        </view>
      </view>
      <view class="it_flex">
        <view class=""></view>
        <view
          class="xiu u-flex-center"
          @click="$func.jump('/wNew/pages/txedit?id=' + item.id)"
          >修改</view
        >
      </view>
    </view>
    <view
      class="add btn u-flex-center"
      @click="$func.jump('/wNew/pages/txedit')"
      >添加新账户</view
    >
  </view>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  onReady() {
    this.$u.post("/api/shop/get_shop_cashaccount", {}).then((res) => {
      if (res.code == 1) {
        this.list = res.data.data;
      }
    });
  },
  onShow() {
    this.$u.post("/api/shop/get_shop_cashaccount", {}).then((res) => {
      if (res.code == 1) {
        this.list = res.data.data;
      }
    });
  },
  methods: {
    choseBank(item) {
      console.log(item, "item");
      uni.setStorageSync("bank", item);
      uni.navigateBack({
        delta: 1,
      });
    },
  },
};
</script>

<style>
page {
  padding: 33rpx;
  box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
.top {
  padding: 30rpx 0;

  .title {
    font-size: 32rpx;
    font-weight: bold;
    color: #333;
  }

  .radius {
    width: 32rpx;
    height: 32rpx;
    border-radius: 50%;
    margin-right: 10rpx;
    border: 1rpx solid #888;
  }

  .rad_css {
    background: #606dce;
    border: 1rpx solid #606dce;
  }

  .grey {
    color: #333;
    font-size: 28rpx;
  }
}
.haedimg {
  width: 100rpx;
  height: 100rpx;
  border-radius: 50%;
}
.it_flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18rpx 0;
}

.item_pad_bot {
  padding-bottom: 10rpx !important;
}

.item {
  padding: 32rpx 30rpx;
  background: #fff;
  font-size: 28rpx;
  border-radius: 10rpx;
  margin-bottom: 20rpx;

  .it_left {
    font-weight: bold;
    color: #222;
  }

  input {
    font-size: 28rpx;
    text-align: right;
  }

  .it_right {
    display: flex;
    align-items: center;

    text {
      color: #989898;
      font-weight: 500;
    }

    .it_lef_img {
      width: 10rpx;
      height: 20rpx;
      margin-left: 10rpx;
    }

    .it_rig_img {
      width: 220rpx;
      height: 220rpx;
      border-radius: 20rpx;
      margin-right: 10rpx;
      margin-bottom: 10rpx;
    }
  }

  .it_right_duo {
    border-bottom: 1rpx solid #dfdfdf;

    &:last-child {
      border: none;
    }
  }

  .it_tit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 30rpx;
    margin-bottom: 30rpx;
    border-bottom: 1rpx solid #f5f5f5;

    .it_grey {
      font-size: 28rpx;
      color: #888;

      image {
        width: 28rpx;
        height: 28rpx;
        margin-right: 10rpx;
      }
    }

    input {
      font-size: 28rpx;
      font-weight: bold;
      text-align: left;
    }
  }

  .it_specs {
    color: #222;
    display: flex;
    font-size: 24rpx;
    align-items: center;
    padding: 10rpx 24rpx;
    background: #f5f5f5;
    border-radius: 26rpx;
    margin-right: 30rpx;
    margin-bottom: 20rpx;

    .it_sp_line {
      width: 2rpx;
      height: 24rpx;
      margin: 0 20rpx 0 24rpx;
    }

    .it_sp_cha {
      width: 20rpx;
      height: 20rpx;
    }

    .it_sp_plus {
      width: 20rpx;
      height: 20rpx;
      margin-right: 20rpx;
    }

    .it_sp_gre {
      color: #606dce;
    }
  }

  .it_specs input {
    flex: 1;
    max-width: 60rpx;
  }

  .it_pri {
    font-size: 24rpx;
    color: #222;
    padding: 10rpx 48rpx;
    background: #f5f5f5;
    border-radius: 26rpx;
    margin-right: 30rpx;
  }

  .it_ban {
    width: 50%;
    padding: 30rpx 0;

    input {
      flex: 1;
      text-align: left;
      margin-left: 20rpx;
    }
  }
}

.add {
  width: 200rpx;
  height: 60rpx;
  font-size: 28rpx;
  color: #fff;
  margin: 0 auto;
  margin-top: 30rpx;
  background: linear-gradient(135deg, #2bb984 0%, #8cd994 100%);
  border-radius: 40rpx;
}
.xiu {
  width: 200rpx;
  height: 60rpx;
  font-size: 28rpx;
  color: #fff;
  margin-top: 30rpx;
  background: linear-gradient(135deg, #2bb984 0%, #8cd994 100%);
  border-radius: 40rpx;
}
.btn {
  width: 630rpx;
  height: 80rpx;
  margin-top: 157rpx;
}
</style>
